<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>排队切换</title>
</head>


<body>
<div id="app">
    <button @click="index++">往前走</button>
    <!-- 设置可变的p 标签 -->
     <p>{{list[index]}}</p>
</div>    

</body>
<script src="http://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"> </script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            index: 0,
            list: ['张三','李四','王五'],
        }
    })
</script>




</html>